﻿@model ProjectManagement.Domain.Entities.UserRole

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>角色分配</title>
	<script src="../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
	<link href="../../Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
	<script src="@Url.Content("~/Scripts/jquery-ui-1.8.22.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
			$("#dialog:ui-dialog").dialog("destroy");

			$("#dialog-message").dialog({
				modal: true,
				height: 300,
				width: 600,
				buttons: {
					确定: function () {
						jQuery("form").first().submit();
					},
					取消: function () {
						window.location.href="UserList";
					}
				}
			});
		});
	</script>
</head>
<body>
<div class="demo">
<div id="dialog-message" title="角色分配">
    @using (Html.BeginForm()) {
			@Html.ValidationSummary(true)
			@Html.HiddenFor(model => model.ID)
			@Html.HiddenFor(model => model.UserID)
			<p>当前角色（同一用户只能拥有一个角色）:</p>
			<p>@ViewBag.RoleName</p>
			<p>
                @Html.LabelFor(model => model.RoleID)
				@Html.DropDownListFor(model => model.RoleID, ViewBag.list as IEnumerable<SelectListItem>)
                @Html.ValidationMessageFor(model => model.RoleID)
			</p>
}
</div>
</div>

</body>
</html>
